3.1.68 \(\int \frac {1-x^2}{1+b x^2+x^4} \, dx\)

Optimal. Leaf size=62 \[ \frac {\log \left (\sqrt {2-b} x+x^2+1\right )}{2 \sqrt {2-b}}-\frac {\log \left (-\sqrt {2-b} x+x^2+1\right )}{2 \sqrt {2-b}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {1164, 628} \begin {gather*} \frac {\log \left (\sqrt {2-b} x+x^2+1\right )}{2 \sqrt {2-b}}-\frac {\log \left (-\sqrt {2-b} x+x^2+1\right )}{2 \sqrt {2-b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 - x^2)/(1 + b*x^2 + x^4),x]

[Out]

-Log[1 - Sqrt[2 - b]*x + x^2]/(2*Sqrt[2 - b]) + Log[1 + Sqrt[2 - b]*x + x^2]/(2*Sqrt[2 - b])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 1164

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[(-2*d)/e - b/c, 2]},
 Dist[e/(2*c*q), Int[(q - 2*x)/Simp[d/e + q*x - x^2, x], x], x] + Dist[e/(2*c*q), Int[(q + 2*x)/Simp[d/e - q*x
 - x^2, x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] &&  !GtQ[b^2
- 4*a*c, 0]

Rubi steps

\begin {align*} \int \frac {1-x^2}{1+b x^2+x^4} \, dx &=-\frac {\int \frac {\sqrt {2-b}+2 x}{-1-\sqrt {2-b} x-x^2} \, dx}{2 \sqrt {2-b}}-\frac {\int \frac {\sqrt {2-b}-2 x}{-1+\sqrt {2-b} x-x^2} \, dx}{2 \sqrt {2-b}}\\ &=-\frac {\log \left (1-\sqrt {2-b} x+x^2\right )}{2 \sqrt {2-b}}+\frac {\log \left (1+\sqrt {2-b} x+x^2\right )}{2 \sqrt {2-b}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.07, size = 125, normalized size = 2.02 \begin {gather*} \frac {\frac {\left (-\sqrt {b^2-4}+b+2\right ) \tan ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {b-\sqrt {b^2-4}}}\right )}{\sqrt {b-\sqrt {b^2-4}}}-\frac {\left (\sqrt {b^2-4}+b+2\right ) \tan ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {\sqrt {b^2-4}+b}}\right )}{\sqrt {\sqrt {b^2-4}+b}}}{\sqrt {2} \sqrt {b^2-4}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 - x^2)/(1 + b*x^2 + x^4),x]

[Out]

(((2 + b - Sqrt[-4 + b^2])*ArcTan[(Sqrt[2]*x)/Sqrt[b - Sqrt[-4 + b^2]]])/Sqrt[b - Sqrt[-4 + b^2]] - ((2 + b +
Sqrt[-4 + b^2])*ArcTan[(Sqrt[2]*x)/Sqrt[b + Sqrt[-4 + b^2]]])/Sqrt[b + Sqrt[-4 + b^2]])/(Sqrt[2]*Sqrt[-4 + b^2
])

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1-x^2}{1+b x^2+x^4} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(1 - x^2)/(1 + b*x^2 + x^4),x]

[Out]

IntegrateAlgebraic[(1 - x^2)/(1 + b*x^2 + x^4), x]

________________________________________________________________________________________

fricas [A]  time = 1.21, size = 100, normalized size = 1.61 \begin {gather*} \left [-\frac {\sqrt {-b + 2} \log \left (\frac {x^{4} - {\left (b - 4\right )} x^{2} + 2 \, {\left (x^{3} + x\right )} \sqrt {-b + 2} + 1}{x^{4} + b x^{2} + 1}\right )}{2 \, {\left (b - 2\right )}}, \frac {\sqrt {b - 2} \arctan \left (\frac {x^{3} + {\left (b - 1\right )} x}{\sqrt {b - 2}}\right ) - \sqrt {b - 2} \arctan \left (\frac {x}{\sqrt {b - 2}}\right )}{b - 2}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+1)/(x^4+b*x^2+1),x, algorithm="fricas")

[Out]

[-1/2*sqrt(-b + 2)*log((x^4 - (b - 4)*x^2 + 2*(x^3 + x)*sqrt(-b + 2) + 1)/(x^4 + b*x^2 + 1))/(b - 2), (sqrt(b
- 2)*arctan((x^3 + (b - 1)*x)/sqrt(b - 2)) - sqrt(b - 2)*arctan(x/sqrt(b - 2)))/(b - 2)]

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+1)/(x^4+b*x^2+1),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,x):;OUTPUT:Warn
ing, need to choose a branch for the root of a polynomial with parameters. This might be wrong.The choice was
done assuming [b]=[0]Precision problem choosing root in common_EXT, current precision 14Warning, need to choos
e a branch for the root of a polynomial with parameters. This might be wrong.The choice was done assuming [b]=
[0]Precision problem choosing root in common_EXT, current precision 14Undef/Unsigned Inf encountered in limitL
imit: Max order reached or unable to make series expansion Error: Bad Argument Value

________________________________________________________________________________________

maple [B]  time = 0.02, size = 279, normalized size = 4.50 \begin {gather*} \frac {b \arctan \left (\frac {2 x}{\sqrt {2 b -2 \sqrt {\left (b -2\right ) \left (b +2\right )}}}\right )}{\sqrt {\left (b -2\right ) \left (b +2\right )}\, \sqrt {2 b -2 \sqrt {\left (b -2\right ) \left (b +2\right )}}}-\frac {b \arctan \left (\frac {2 x}{\sqrt {2 b +2 \sqrt {\left (b -2\right ) \left (b +2\right )}}}\right )}{\sqrt {\left (b -2\right ) \left (b +2\right )}\, \sqrt {2 b +2 \sqrt {\left (b -2\right ) \left (b +2\right )}}}+\frac {2 \arctan \left (\frac {2 x}{\sqrt {2 b -2 \sqrt {\left (b -2\right ) \left (b +2\right )}}}\right )}{\sqrt {\left (b -2\right ) \left (b +2\right )}\, \sqrt {2 b -2 \sqrt {\left (b -2\right ) \left (b +2\right )}}}-\frac {\arctan \left (\frac {2 x}{\sqrt {2 b -2 \sqrt {\left (b -2\right ) \left (b +2\right )}}}\right )}{\sqrt {2 b -2 \sqrt {\left (b -2\right ) \left (b +2\right )}}}-\frac {2 \arctan \left (\frac {2 x}{\sqrt {2 b +2 \sqrt {\left (b -2\right ) \left (b +2\right )}}}\right )}{\sqrt {\left (b -2\right ) \left (b +2\right )}\, \sqrt {2 b +2 \sqrt {\left (b -2\right ) \left (b +2\right )}}}-\frac {\arctan \left (\frac {2 x}{\sqrt {2 b +2 \sqrt {\left (b -2\right ) \left (b +2\right )}}}\right )}{\sqrt {2 b +2 \sqrt {\left (b -2\right ) \left (b +2\right )}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-x^2+1)/(x^4+b*x^2+1),x)

[Out]

-2/((b-2)*(b+2))^(1/2)/(2*b+2*((b-2)*(b+2))^(1/2))^(1/2)*arctan(2/(2*b+2*((b-2)*(b+2))^(1/2))^(1/2)*x)-1/(2*b+
2*((b-2)*(b+2))^(1/2))^(1/2)*arctan(2/(2*b+2*((b-2)*(b+2))^(1/2))^(1/2)*x)-1/((b-2)*(b+2))^(1/2)/(2*b+2*((b-2)
*(b+2))^(1/2))^(1/2)*b*arctan(2/(2*b+2*((b-2)*(b+2))^(1/2))^(1/2)*x)+2/((b-2)*(b+2))^(1/2)/(2*b-2*((b-2)*(b+2)
)^(1/2))^(1/2)*arctan(2/(2*b-2*((b-2)*(b+2))^(1/2))^(1/2)*x)-1/(2*b-2*((b-2)*(b+2))^(1/2))^(1/2)*arctan(2/(2*b
-2*((b-2)*(b+2))^(1/2))^(1/2)*x)+1/((b-2)*(b+2))^(1/2)/(2*b-2*((b-2)*(b+2))^(1/2))^(1/2)*b*arctan(2/(2*b-2*((b
-2)*(b+2))^(1/2))^(1/2)*x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -\int \frac {x^{2} - 1}{x^{4} + b x^{2} + 1}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+1)/(x^4+b*x^2+1),x, algorithm="maxima")

[Out]

-integrate((x^2 - 1)/(x^4 + b*x^2 + 1), x)

________________________________________________________________________________________

mupad [B]  time = 4.34, size = 76, normalized size = 1.23 \begin {gather*} -\frac {\mathrm {atan}\left (\frac {x}{\sqrt {b-2}}\right )-\mathrm {atan}\left (\left (b-2\right )\,\left (x\,\left (\frac {1}{\sqrt {b-2}}+\frac {\frac {4}{b-2}+1}{\sqrt {b-2}\,\left (b+2\right )}\right )+\frac {x^3\,\left (\frac {2\,b}{b-2}-1\right )}{\sqrt {b-2}\,\left (b+2\right )}\right )\right )}{\sqrt {b-2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(x^2 - 1)/(b*x^2 + x^4 + 1),x)

[Out]

-(atan(x/(b - 2)^(1/2)) - atan((b - 2)*(x*(1/(b - 2)^(1/2) + (4/(b - 2) + 1)/((b - 2)^(1/2)*(b + 2))) + (x^3*(
(2*b)/(b - 2) - 1))/((b - 2)^(1/2)*(b + 2)))))/(b - 2)^(1/2)

________________________________________________________________________________________

sympy [A]  time = 0.35, size = 87, normalized size = 1.40 \begin {gather*} \frac {\sqrt {- \frac {1}{b - 2}} \log {\left (x^{2} + x \left (- b \sqrt {- \frac {1}{b - 2}} + 2 \sqrt {- \frac {1}{b - 2}}\right ) + 1 \right )}}{2} - \frac {\sqrt {- \frac {1}{b - 2}} \log {\left (x^{2} + x \left (b \sqrt {- \frac {1}{b - 2}} - 2 \sqrt {- \frac {1}{b - 2}}\right ) + 1 \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x**2+1)/(x**4+b*x**2+1),x)

[Out]

sqrt(-1/(b - 2))*log(x**2 + x*(-b*sqrt(-1/(b - 2)) + 2*sqrt(-1/(b - 2))) + 1)/2 - sqrt(-1/(b - 2))*log(x**2 +
x*(b*sqrt(-1/(b - 2)) - 2*sqrt(-1/(b - 2))) + 1)/2

________________________________________________________________________________________